package editor.project;

import static org.junit.Assert.*;

import java.io.File;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import editor.project.Project.ReturnCode;

public class ProjectTest 
{

	private Project validProject;
	private Project invalidProject;
	private File directory = new File ("");
	private String projectDirectory = directory.getAbsolutePath() + System.getProperty("file.separator") + "TestProjects" + System.getProperty("file.separator");
	private String validProjectName = "Project_A";
	private String invalidProjectName = "Project_A_invalid";
	
	@Before
	public void setUp() throws Exception 
	{
		validProject = new Project(validProjectName, projectDirectory);
		invalidProject = new Project(invalidProjectName, projectDirectory);
	}

	@After
	public void tearDown() throws Exception 
	{
	}
	
	@Test
	public void testSetup() 
	{
		assertEquals(
			ReturnCode.OK,
			validProject.setup()
		);	
		

	}
	
	@Test
	public void testGetDirectory() 
	{
		assertEquals(
			projectDirectory + validProjectName + System.getProperty("file.separator") + "bin" + System.getProperty("file.separator") ,
			validProject.getDirectory("bin")
		);
	}

	/*

	@Test
	public void testProject() {
		fail("Not yet implemented");
	}

	@Test
	public void testSetup() {
		fail("Not yet implemented");
	}

	@Test
	public void testLoad() {
		fail("Not yet implemented");
	}

	@Test
	public void testEqualsProject() {
		fail("Not yet implemented");
	}

	@Test
	public void testCompile() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetCompileExitCode() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetCompileErrorStream() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetCompileInputStream() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetXMLElement() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetName() {
		fail("Not yet implemented");
	}

	@Test
	public void testSetName() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetDirectory() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetBin() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetSource() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetTests() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetFullDirectory() {
		fail("Not yet implemented");
	}

	@Test
	public void testSetDirectory() {
		fail("Not yet implemented");
	}

	@Test
	public void testValidate() {
		fail("Not yet implemented");
	}

	@Test
	public void testToString() {
		fail("Not yet implemented");
	}
	*/

}
